﻿<phone:PhoneApplicationPage x:Class="TaxiPlease.MainPage"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
                            xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
                            xmlns:controls="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls"
                            xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                            xmlns:toolkit="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone.Controls.Toolkit"
                            xmlns:maps="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps"
                            xmlns:local="clr-namespace:TaxiPlease;assembly=TaxiPlease"
                            xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                            FontFamily="{StaticResource PhoneFontFamilyNormal}"
                            FontSize="{StaticResource PhoneFontSizeNormal}"
                            Foreground="{StaticResource PhoneForegroundBrush}"
                            SupportedOrientations="Portrait"
                            Orientation="Portrait"
                            mc:Ignorable="d"
                            d:DesignHeight="696"
                            d:DesignWidth="480"
                            shell:SystemTray.IsVisible="True">
    <toolkit:TransitionService.NavigationInTransition>
        <toolkit:NavigationInTransition>
            <toolkit:NavigationInTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardIn" />
            </toolkit:NavigationInTransition.Backward>
            <toolkit:NavigationInTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardIn" />
            </toolkit:NavigationInTransition.Forward>
        </toolkit:NavigationInTransition>
    </toolkit:TransitionService.NavigationInTransition>
    <toolkit:TransitionService.NavigationOutTransition>
        <toolkit:NavigationOutTransition>
            <toolkit:NavigationOutTransition.Backward>
                <toolkit:TurnstileTransition Mode="BackwardOut" />
            </toolkit:NavigationOutTransition.Backward>
            <toolkit:NavigationOutTransition.Forward>
                <toolkit:TurnstileTransition Mode="ForwardOut" />
            </toolkit:NavigationOutTransition.Forward>
        </toolkit:NavigationOutTransition>
    </toolkit:TransitionService.NavigationOutTransition>
    <phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar Mode="Default"
                              ForegroundColor="#FF6A00">

            <shell:ApplicationBarIconButton IconUri="Images/appbar.questionmark.rest.png"
                                            Text="about"
                                            Click="About_Click" />
            <shell:ApplicationBarIconButton IconUri="Images/appbar.feature.settings.rest.png"
                                            Text="settings"
                                            Click="Settings_Click" />
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <StackPanel Orientation="Horizontal">
            <Image Source="Images/taxi.png"
                   Margin="-36 0 0 12" />
            <TextBlock Text="taxi please!"
                       Style="{StaticResource PhoneTextTitle1Style}" />
        </StackPanel>

        <ScrollViewer VerticalScrollBarVisibility="Auto"
                      Margin="0 0 0 48"
                      Grid.Row="1">
            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*"
                                   MinHeight="50" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <maps:Map x:Name="map"
                        
                          ZoomLevel="15"
                          LogoVisibility="Collapsed"
                          CopyrightVisibility="Collapsed"
                          Margin="-24 12"
                          CredentialsProvider="Au0EwZ9Ijx9AFkG-wp8oWPmxMHctztQ7xNvvmeh5cF44UYMTPbX1cP1-TQoV2Uz_">
                    <maps:MapLayer x:Name="layer1">
                        <maps:Pushpin x:Name="pushpin"
                                      Background="{StaticResource BackgroundBrush}"
                                      Location="{Binding Location}" />
                    </maps:MapLayer>
                </maps:Map>
                <TextBlock Text="{Binding Address}"
                           Grid.Row="1"
                           Style="{StaticResource PhoneTextSubtleStyle}"
                           TextWrapping="Wrap" />
                <HyperlinkButton Grid.Row="2"
                                 Style="{StaticResource CallHyperlink}"
                                 Command="{Binding SendMessageCommand}"
                                 HorizontalAlignment="Left">
                    <StackPanel Orientation="Horizontal">
                        <Image Source="Images/sms.png" />
                        <TextBlock Text="send message"
                                   Style="{StaticResource PhoneTextLargeStyle }" />
                    </StackPanel>
                </HyperlinkButton>
                <HyperlinkButton Grid.Row="3"
                                 HorizontalAlignment="Left"
                                 Command="{Binding CallCommand}"
                                 Style="{StaticResource CallHyperlink}">
                    <StackPanel Orientation="Horizontal">
                        <Image Source="Images/phone.png" />
                        <TextBlock Text="{Binding Options.TaxiPhoneNumber}"
                                   Style="{StaticResource PhoneTextLargeStyle }" />
                    </StackPanel>
                </HyperlinkButton>
            </Grid>
        </ScrollViewer>
    </Grid>
</phone:PhoneApplicationPage>